package com.sdx.console.ncode.web.query;

import com.ibeetl.admin.core.annotation.Query;
import com.ibeetl.admin.core.util.enums.CoreDictType;
import com.ibeetl.admin.core.web.query.PageParam;
import java.util.Date;
import com.sdx.common.utils.Utils;
/**
 *N码查询
 */
public class RightNcodeQuery extends PageParam {
    @Query(name = "n码", display = true)        
    private String nCode;
    public String getNCode(){
        return  nCode;
    }
    public void setNCode(String nCode ){
        this.nCode = nCode;
    }
    @Query(name = "激活时间", display = true)
    private String activedTime;
    private Date activedTimeStart;
    private Date activedTimeEnd;
    @Query(name = "有效截止期", display = true)
    private String expiredDate;
    private Date expiredDateStart;
    private Date expiredDateEnd;
    public String getActivedTime(){
        return  activedTime;
    }
    public void setActivedTime(String activedTime ){
        this.activedTime = activedTime;
        Date[] timePair = Utils.parseQueryTime(activedTime);
        if (timePair!=null && timePair[0]!=null) {
            this.activedTimeStart = timePair[0];
        }
        if (timePair!=null && timePair.length==2 && timePair[1]!=null) {
            this.activedTimeEnd = timePair[1];
        }
    }
    public Date getActivedTimeStart(){
        return  activedTimeStart;
    }
    public void setActivedTimeStart(Date activedTimeStart ){
        this.activedTimeStart = activedTimeStart;
    }
    public Date getActivedTimeEnd(){
        return  activedTimeEnd;
    }
    public void setActivedTimeEnd(Date activedTimeEnd ){
        this.activedTimeEnd = activedTimeEnd;
    }
    public String getExpiredDate(){
        return  expiredDate;
    }
    public void setExpiredDate(String expiredDate ){
        this.expiredDate = expiredDate;
        Date[] timePair = Utils.parseQueryTime(expiredDate);
        if (timePair!=null && timePair[0]!=null) {
            this.expiredDateStart = timePair[0];
        }
        if (timePair!=null && timePair.length==2 && timePair[1]!=null) {
            this.expiredDateEnd = timePair[1];
        }
    }
    public Date getExpiredDateStart(){
        return  expiredDateStart;
    }
    public void setExpiredDateStart(Date expiredDateStart ){
        this.expiredDateStart = expiredDateStart;
    }
    public Date getExpiredDateEnd(){
        return  expiredDateEnd;
    }
    public void setExpiredDateEnd(Date expiredDateEnd ){
        this.expiredDateEnd = expiredDateEnd;
    }
}
